
package com.example.paper.common.datam.userStudentJob;

import com.example.paper.common.datam.migrate.processor.BaseProcessor;
import com.example.paper.common.entity.UserStudent;
import com.example.paper.common.entity.UserStudent2;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * 描述.
 *
 * @author Long Fengfan, 2022年10月17日

 */
@Component
@Slf4j
public class UserStudentProcessor extends BaseProcessor<UserStudent, UserStudent2> {
    @Override
    public void rollBack(Map<String, Object> processorParams) {
        log.info("roll Back...:{}", processorParams);
    }


    @Override
    public UserStudent2 transfer(UserStudent userStudent) {
        UserStudent2 userStudent2 = new UserStudent2();
        BeanUtils.copyProperties(userStudent, userStudent2);
        return userStudent2;
    }
}
